home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 075 - Clash of Arms.dsk / WAR.START.S < prev    next >
Text File  |  2019-02-17  |  23KB  |  692 lines

  1.                          ;  ************************* 
  2.                          ; **                       **
  3.                          ; *      lash of rms      *
  4.                          ; *     Startup Segment     *
  5.                          ; **                       **
  6.                          ;  ************************* 
  7.  
  8.           public MainCommand
  9.           public FromNew
  10.           public QuitGame
  11.           public TermGame
  12.  
  13.           pt=0
  14.           setint(chr$(29)):print chr$(5);chr$(1,info(2)*15);:pt=(key(0)=29):setint("")
  15.           if info(0)=0 pt=1
  16.           store "h:vars"
  17.           on nocar goto termgame
  18.           poke 34,0
  19.           dr$="b:"
  20.           an=not(pt)
  21.           gosub home
  22.  
  23.           gosub CheckBar
  24.           print chr$(12)
  25.           if pt copy dr$+"clash.title":gosub credits:goto Restart
  26.           print \chr$(45,78)
  27.           print \"                                 Welcome to:"
  28.           print \"                                Clash of Arms"
  29.           print \chr$(45,78)
  30.           gosub credits
  31.           print \"                            Emulation: VT100/ANSI"
  32.           print \chr$(45,78)
  33. Restart
  34.           gosub ScanMaster
  35.           if gp=0 print \"You are not currently playing in any game.":goto premain
  36.           print \"You are playing in game #"gp".  ";
  37.           print "Please wait...";
  38.  
  39.           gn$=str$(gp)
  40.  
  41.           kill "h:war.map1":create "h:war.map1"
  42.           open #2,"h:war.map1":open #1,dr$+"war.map1."+gn$
  43.           for ka=0 to 45:position #1,80,ka:input #1,ka$
  44.           position #2,80,ka:print #2,ka$
  45.           next
  46.           close
  47.  
  48.           kill "h:war.map2":create "h:war.map2"
  49.           open #2,"h:war.map2":open #1,dr$+"war.map2."+gn$
  50.           for ka=0 to 45:position #1,80,ka:input #1,ka$
  51.           position #2,80,ka:print #2,ka$
  52.           next
  53.           close
  54.  
  55.           kill "h:attacks":create "h:attacks":open #1,dr$+"attacks."+gn$
  56.           open #2,"h:attacks"
  57.           for p1=0 to 5
  58.           for p2=0 to 5
  59.           position #1,60,p1,10*p2:input #1,ka
  60.           position #1,60,p1,(10*p2)+5:input #1,kb
  61.           position #2,60,p1,10*p2:print #2,ka
  62.           position #2,60,p1,(10*p2)+5:print #2,kb
  63.           next
  64.           next
  65.           close
  66.  
  67.           print chr$(8,14);chr$(32,14);chr$(8,14)
  68. premain
  69.           gosub PrintNews
  70.  
  71.           ready "g:war.mail"
  72.           if not msg(un) goto MainCommand
  73.           print \"A soldier informs you that some messages are waiting in the embassy.."\
  74.           link "a:war.mail","rd.mail"
  75.  
  76. MainCommand
  77.           close
  78.           on nocar goto termgame
  79.           print \"Clash of Arms (?=Help): ";:input kb$
  80.           if (kb$="?") and pt print chr$(12);:setint(" "):copy dr$+"coa.menu":gosub invoff:goto MainCommand
  81.           if kb$="?" goto PrintMenu
  82.           if kb$="H" link "a:war.help1"
  83.           if kb$="P" goto PlayGame
  84.           if (kb$="*") and info(5) link "a:war.sysop.seg"
  85.           if kb$="L" gosub ListGames:goto MainCommand
  86.           if kb$="Q" recall "h:vars":kill "h:vars":gosub topscrn:link "a:main.seg","fromsys"
  87.           if kb$="J" goto JoinGame
  88.           if kb$="V" gosub GetGame:goto ViewGame
  89.           if kb$="D" link "a:war.mail"
  90.           if kb$="F" goto HallFame
  91.           if kb$="M" goto mapview
  92.           if kb$="S" goto Surrender
  93.           if kb$="^" goto switch
  94.           print \"Invalid command":goto MainCommand
  95.  
  96. PrintMenu
  97.           setint(" ")
  98.           copy dr$+"coa.main.menu"
  99.           setint(""):goto MainCommand
  100.  
  101. CheckBar
  102.           if pt=0 return
  103.           print chr$(30) ;chr$(32);chr$(33);
  104.           print chr$(15) ;"Your status bar is on!  Turn it off, then press return."
  105.           print chr$(14) ;"Press return to continue"
  106.           print chr$(30) ;chr$(32);chr$(32);chr$(10);chr$(25);
  107.           input @3 ka$
  108.           return
  109.  
  110. ViewGame
  111.           if gn=0 goto MainCommand
  112.           input \"View Command (?=Help): ";ka$
  113.           if ka$="?" print \"Current game: ";gn
  114.           if ka$="?" print '
  115. View:      P: Players
  116.                 M: Map
  117.                 K: Kills
  118.  
  119. G:        View different game
  120. Q:        Quit':goto ViewGame
  121.  
  122.           if ka$="G" gosub GetGame:goto ViewGame
  123.           if ka$="P" gosub ListPlayers
  124.           if ka$="M" gosub ViewMap
  125.           if ka$="K" gosub PrintKills
  126.           if ka$="Q" goto MainCommand
  127.           goto ViewGame
  128.  
  129. printkills
  130.           gosub home
  131.           copy dr$+"kills"
  132.           open #1,dr$+"attacks."+gn$
  133.           for p1=0 to 5
  134.           for p2=0 to 5
  135.           position #1,60,p1,(10*p2)+5
  136.           input #1,qn
  137.           y=p1+9:x=(11*p2)+12:gosub screen
  138.           print "|    "qn;
  139.           next
  140.           next
  141.           x=1:y=16:gosub screen
  142.           close
  143.           return
  144.  
  145. ViewMap
  146.           gosub Home
  147.           open #1,dr$+"war.map1."+str$(gn)
  148.           for ka = 1 to 23:input #1,ka$:print ka$:next
  149.           print "Press Q to quit, any other key for rest of map.";:get ka$
  150.           if ka$="Q" close:return
  151.           x=1:y=23:gosub Screen
  152.           for ka = 1 to 23:input #1,ka$:print ka$:next
  153.           close
  154.           return
  155.  
  156. ListPlayers
  157.           open #1,dr$+"GAME.DATA."+gn$
  158.           open #2,dr$+"WAR.MASTER"
  159.           print \"List of players:"\
  160.           print "#    Code  Name                     Last Played    # of Cities/Armies"
  161.           print "---------------------------------------------------------------------"
  162.           for ka = 1 to 6
  163.           position #2,35,(gn-1),(ka-1)*5:input #2,kb
  164.           if kb=0 goto List1
  165.           print left$(str$(kb)+"     ",5);
  166.           print mid$("ABCDEF",ka,1)"     ";
  167.           position #1,1,(ka-1)*25:input #1,ka$:print left$(ka$+chr$(46,25),25);
  168.           position #1,1,(ka-1)*10+150:input #1,ka$:print ka$"       ";
  169.           position #1,1,(ka-1)*5+270:input #1,kb:print kb"/";
  170.           position #1,1,(ka-1)*5+300:input #1,kb:print kb
  171. List1
  172.           next
  173.           close
  174.           return
  175.  
  176. JoinGame
  177.           if gp<>0 print \"You are already in a game!":goto MainCommand
  178.           print '
  179. You       will be placed in a game.  As soon as there are six players, the game will
  180. start.     You will be notified in E-Mail when you can begin play.
  181.  
  182. This      game requires you to call frequently, preferably every day. Read the
  183. H)elp     file for more information.  If you do not plan on actively participating,
  184. then      do not Join the game.
  185.  
  186. In        order to play this game, you MUST have ProTERM Special, Datamedia, VT-100,
  187. or        ANSI emulation.  Please do not join a game if your terminal program is not
  188. capable   of any of the above emulations.'
  189.  
  190.           input \"Are you sure you want to join a game? (Y/[N]): ";ka$
  191.           if ka$ <> "Y" goto MainCommand
  192.           open #1,dr$+"Game.to.join":input #1,ka$:close
  193.           gn=val(ka$):if gn=0 gn=1
  194.           open #1,dr$+"war.master"
  195. JoinLoop
  196.           for kb = 1 to 6
  197.           position #1,35,gn-1,30:input #1,ka:if ka kb=6:goto PastAdd
  198.           position #1,35,gn-1,(kb-1)*5:input #1,ka$
  199.           if (val(ka$)=0) and (ka$<>"0") close:gosub NewFile
  200.           if val(ka$)=0 close:gosub AddPlayer:kb=6
  201. PastAdd
  202.           next
  203.           if gn=0 goto Restart
  204.           gn=gn+1:goto JoinLoop
  205.  
  206. NewFile
  207.           gn$=str$(gn)
  208.           print \"Five moments please";
  209.           kill dr$+"GAME.DATA."+gn$:create dr$+"GAME.DATA."+gn$
  210.           open #1,dr$+"GAME.DATA."+gn$
  211.  
  212.           for ka = 0 to 125 step 25
  213.           position #1,1,ka:print #1,"Empty"
  214.           next
  215.  
  216.           for ka = 150 to 200 step 10
  217.           position #1,1,ka:print #1,"00/00/00"
  218.           next
  219.  
  220.           for ka = 210 to 295 step 5
  221.           position #1,1,ka:print #1,0
  222.           next
  223.  
  224.           for ka = 300 to 325 step 5
  225.           position #1,1,ka:print #1,4
  226.           next
  227.           close
  228.           print "."      ;
  229.  
  230.           open #1,dr$+"war.master"
  231.           for ka = 1 to 6
  232.           position #1,35,(gn-1),(ka-1)*5:print #1,0
  233.           position #1,35,(gn-1),30:print #1,0
  234.           next
  235.           close
  236.           print "."      ;
  237.           gosub NewGameFiles
  238.           return
  239.  
  240. NewGameFiles
  241.           kill dr$+"attacks."+gn$:create dr$+"attacks."+gn$:open #1,dr$+"attacks."+gn$
  242.           for p1=0 to 5
  243.           for p2=0 to 5
  244.           position #1,60,p1,10*p2:print #1,0
  245.           position #1,60,p1,(10*p2)+5:print #1,0
  246.           next
  247.           next
  248.           close
  249.           print "."      ;
  250.  
  251.           kill dr$+"war.map1."+gn$:create dr$+"war.map1."+gn$
  252.           open #1,dr$+"war.map1":open #2,dr$+"war.map1."+gn$:copy #1,#2:close
  253.           print "."      ;
  254.  
  255.           kill dr$+"war.map2."+gn$:create dr$+"war.map2."+gn$
  256.           open #1,dr$+"war.map2":open #2,dr$+"war.map2."+gn$:copy #1,#2:close
  257.           print "."
  258.           return
  259.  
  260. AddPlayer
  261.           gn$=str$(gn)
  262.           print \"You will be player #"kb" in game #"gn"."
  263.  
  264.           open #1,dr$+"war.master"
  265.           position #1,35,(gn-1),(kb-1)*5:print #1,un
  266.           close
  267.  
  268.           open #1,dr$+"game.data."+gn$
  269.           position #1,1,(kb-1)*25:print #1,a3$
  270.           position #1,1,((kb-1)*10)+150:print #1,date$
  271.           close
  272.  
  273.           kill dr$+"game.to.join":create dr$+"game.to.join":open #1,dr$+"game.to.join"
  274.           if kb<>6 print #1,gn
  275.           if kb=6 print #1,0
  276.           close
  277.  
  278.           if kb=6 print \"You are the sixth player, so the game will start now!"
  279.           if kb=6 print \"Notifying other players...":link "a:war.sysop.seg","BeginGame"
  280.           gn=0:return
  281.  
  282. PlayGame
  283.           gn=gp:gn$=str$(gn)
  284.           if gn=0 print \"You are not playing in a game yet!"
  285.           open #1,dr$+"war.master"
  286.           position #1,35,(gn-1),30:input#1,ka
  287.           if ka=0 print '
  288. This      game has not been started yet.  If no one new has joined this game for a
  289. while,    ask the sysop to start it for you.':close:goto MainCommand
  290.           kc=0
  291.           for ka = 1 to 6
  292.           position #1,35,(gn-1),(ka-1)*5:input #1,kb:if un=kb pn=ka
  293.           if kb kc=kc+1
  294.           next
  295.           close
  296.           if ka$="S" return
  297.                          ; The Surrender calls this routine to find player number...
  298.           if kc=1 gosub Winner:goto Restart
  299.  
  300.           pc$ = mid$("abcdef",pn,1) 
  301.           gosub RecentAttacks
  302.           print \"         Player number: "pn
  303.           print "             Character: "pc$
  304.           open #1,dr$+"game.data."+gn$
  305.           position #1,1,(pn-1)*10+150:input #1,kd$
  306.           gosub CountDays
  307.           position #1,1,(pn-1)*10+150:print #1,date$
  308.           close
  309.           if x1=0 print \"You have played today";:if ((info(5)) or (un=37)) print ", but since you are the sysop, you can play anyway.";
  310.           if x1=0 print ""
  311.           if peek(-16287)>127 poke -16287,0:goto pastply
  312.           if (x1=0) and not(info(5)) goto MainCommand
  313. pastply
  314.           kk=x1-1
  315.           if x1<=1 nm=3:else nm=3+(2*kk)
  316.           if nm>9 nm=9
  317.           print "Days since last played: "x1
  318.           if x1>1 print \"Since you missed a few turns, you are allowed "nm" moves/army this turn."\
  319.           open #1,dr$+"game.data."+gn$
  320.  
  321.           position #1,1,(pn-1)*5+210:input #1,ka:ka=ka+x1
  322.           position #1,1,(pn-1)*5+210:print #1,ka
  323.  
  324.           position #1,1,(pn-1)*5+240:input #1,ab
  325.           position #1,1,(pn-1)*5+300:input #1,kz
  326.           position #1,1,(pn-1)*5+270:input #1,ct
  327.           if (kz+ct)=0 close:goto Loser
  328.  
  329.           if ka<3 print "Turns until New Armies: "3-ka:goto nonewarmies
  330.  
  331.           ka=ka-3:position #1,1,(pn-1)*5+210:print #1,ka
  332.           ab=ab+ct
  333.           print "            New armies: "ct"!"
  334.           position #1,1,(pn-1)*5+240:print #1,ab
  335.  
  336. NoNewArmies
  337.           close
  338.           print "       Unplaced armies: "ab
  339.           if ab=0 goto PastPlace
  340. AskLoop
  341.           print \"Do you want to place some armies now?  (Y/N): ";
  342.           input ka$
  343.           if ka$ = "N" goto PastPlace
  344.           if ka$ <> "Y" goto AskLoop
  345.           kz=ab
  346.           if (pt) or (an) link "a:new.army2":else link "a:new.army"
  347.  
  348. FromNew
  349.           close
  350.           open #1,dr$+"game.data."+gn$
  351.           position #1,1,(pn-1)*5+300
  352.           input #1,kb
  353.           kb=kb+(kz-ab)
  354.           position #1,1,(pn-1)*5+300
  355.           print #1,kb
  356.           position #1,1,(pn-1)*5+240:print #1,ab
  357.           close
  358.  
  359. PastPlace
  360.           if (peek(-16287)>127) and (info(5)) link "a:war.move3"
  361.           if (pt) or (an) link "a:war.move2":else link "a:war.move"
  362.  
  363. TermGame
  364.           close
  365.           recall "h:vars"
  366.           kill "h:vars"
  367.           gosub SaveFiles
  368.           link "a:main.seg","term1"
  369.  
  370. QuitGame
  371.           close
  372.           gosub home
  373.           gosub SaveFiles
  374.           goto MainCommand
  375.  
  376. SaveFiles
  377.           if gp=0 return
  378.           open #1,dr$+"war.master"
  379.           position #1,35,(gn-1),30:input #1,ka
  380.           close
  381.           if ka=0 return
  382.           print \"Saving game";
  383.  
  384.           kill dr$+"war.map1."+gn$:create dr$+"war.map1."+gn$
  385.           open #1,"h:war.map1":open #2,dr$+"war.map1."+gn$
  386.           for ka=0 to 45:position #1,80,ka:input #1,ka$
  387.           position #2,80,ka:print #2,ka$
  388.           next
  389.           close
  390.           print "."      ;
  391.  
  392.           kill dr$+"war.map2."+gn$:create dr$+"war.map2."+gn$
  393.           open #1,"h:war.map2":open #2,dr$+"war.map2."+gn$
  394.           for ka=0 to 45:position #1,80,ka:input #1,ka$
  395.           position #2,80,ka:print #2,ka$
  396.           next
  397.           close
  398.           print "."      ;
  399.  
  400.           kill dr$+"attacks."+gn$:create dr$+"attacks."+gn$
  401.           open #1,"h:attacks":open #2,dr$+"attacks."+gn$
  402.           for p1=0 to 5
  403.           for p2=0 to 5
  404.           position #1,60,p1,10*p2:input #1,ka
  405.           position #1,60,p1,(10*p2)+5:input #1,kb
  406.           position #2,60,p1,10*p2:print #2,ka
  407.           position #2,60,p1,(10*p2)+5:print #2,kb
  408.           next
  409.           next
  410.           close
  411.           print "."      ;
  412.           
  413.           open #1,dr$+"game.data."+gn$
  414.           position #1,1,(pn-1)*5+270:print #1,ct
  415.           close
  416.           print "  Saved."
  417.           return
  418.  
  419. RecentAttacks
  420.           kb=(instr(pc$,"ABCDEF"))-1
  421.           print ""
  422.           open #1,dr$+"game.data."+gn$
  423.           open #2,dr$+"attacks."+gn$
  424.           ka=0
  425.           for p1=0 to 5
  426.           position #2,60,p1,(10*kb)
  427.           input #2,qt
  428.           if qt=0 goto NoAttack
  429.           print qt" of your armies were killed by player "chr$(p1+97)".  (";
  430.           position #1,1,p1*25:input #1,ka$
  431.           print ka$")":ka=1
  432.           position #2,60,p1,(10*kb):print #2,0
  433. NoAttack
  434.           next
  435.           if ka=0 print "You were not attacked."
  436.           close
  437.           return
  438.  
  439. CountDays
  440.           x$="000031059090120151181212243273304334"
  441.           x1$=mid$(x$,(val(mid$(kd$,1,2))*3)-2,3)
  442.           x1$=str$(val(x1$)+val(mid$(kd$,4,2)))
  443.           x2$=mid$(x$,(val(mid$(date$,1,2))*3)-2,3)
  444.           x2$=str$(val(x2$)+val(mid$(date$,4,2)))
  445.           if val(mid$(kd$,8,1))<>val(mid$(date$,8,1)) x2$=str$(val(x2$)+365)
  446.           x1=val(x2$)-val(x1$)
  447.           return
  448.  
  449. ListGames
  450.           print '
  451. #            # of players In Progress
  452. ----      ------------ -----------'
  453.           open #1,dr$+"war.master"
  454.           ka=1
  455. ListLoop
  456.           kc=0
  457.           for kb = 1 to 6
  458.           position #1,35,ka-1,(kb-1)*5:input #1,ka$
  459.           if (val(ka$)=0) and (ka$<>"0") and (ka$<>"D") ka=0
  460.           if ka$="D" kc=7
  461.           if val(ka$) > 0 kc=kc+1
  462.           next
  463.           if kc>6 kc=0
  464.           if ka=0 close:return
  465.           if kc print left$(str$(ka)+"     ",5);kc;"            ";
  466.           position #1,35,(ka-1),30:input #1,kd
  467.           if kc=0 ka=ka+1:goto ListLoop
  468.           if kd=0 print "No":else print "Yes"
  469.           ka=ka+1:goto ListLoop
  470.  
  471. ScanMaster
  472.           open #1,dr$+"war.master"
  473.           gp=1:ka=0
  474. ScanLoop
  475.           for pn = 1 to 6
  476.           position #1,35,(gp-1),(pn-1)*5:input #1,ka$
  477.           if len(ka$)<1 gp=0
  478.           if val(ka$)=un ka=1
  479.           next
  480.           if gp=0 close:return
  481.           if ka=0 gp=gp+1:goto ScanLoop
  482.           close:return
  483.  
  484. GetGame
  485.           input \"Game Number (?=List): ";GN$
  486.           if gn$="?" gosub ListGames:goto GetGame
  487.           gn=val(gn$)
  488.           if gn=0 gn$="0":print "- Aborted -":return
  489.           open #1,dr$+"war.master":position #1,35,(gn-1):input #1 ka$:close
  490.           if val(ka$)=0 and (ka$<>"0") print '
  491. That      game is not being played right now.':goto GetGame
  492.                          ; gn and gn$ = game number
  493.           return
  494.  
  495. StartGame
  496.           open #1,dr$+"WAR.MASTER"
  497.           for ka = 1 to 6
  498.           position #1,35,(gn-1),(ka-1)*5:input #1,kb
  499.           if kb=0 goto PastMail
  500.  
  501. MailUsers
  502.           d=kb
  503.           edit(0)
  504.           print #8,"Clash of Arms Notification:"
  505.           print #8,""
  506.           print #8,"As of "date$" "time$" enough players have entered the game."
  507.           print #8,"You may begin play, in game #"gn"!"
  508.           print #8,""
  509.           ready "g:mail"
  510.           if info(6)<29 print \"Mail bit-map full":return
  511.           print #msg(d),un
  512.           print #6,"Subj: Clash of Arms"
  513.           print #6,"From: War Command Headquarters"
  514.           copy #8,#6:print #msg(d),chr$(4);chr$(0);
  515.           msg(d)=msg(d)+1:update
  516.  
  517. PastMail
  518.           next
  519.           position #1,35,(gn-1),30:print #1,1
  520.           close
  521.           open #1,dr$+"game.data."+str$(gn)
  522.           for ka = 0 to 5
  523.           position #1,1,150+(ka*10)
  524.           print #1,left$(date$,3);
  525.           print #1,right$("0"+ str$(val(mid$(date$,4,2))-1),2);right$(date$,3)
  526.           next
  527.           close:return
  528.  
  529. pmcon
  530.           z=val(left$(time$,2)):z$=" AM"
  531.           if z>12 then z$=" PM":z=z-12
  532.           z$=str$(z)+mid$(time$,3,6)+z$:return
  533.  
  534. PrintNews
  535.           ka=0:i$=dr$+"war.news"
  536.           kill "h:news":create "h:news":open #2,"h:news"
  537.           open #1,i$
  538.           input #1,ka$:if len(ka$)<1 close:return
  539.           close #1:open #1,i$
  540.           copy #1,#2:close:kill i$:create i$:open #1,i$:open #2,"h:news"
  541. NewsLoop
  542.           input #2,ka$
  543.           if len(ka$)<1 close:return
  544.           kd$=left$(ka$,8)
  545.           gosub CountDays
  546.           if x1>5 goto NewsLoop
  547.           if ka=0 print \"--------------------- War Update ---------------------"\:ka=1
  548.           print ka$
  549.           print #1,ka$
  550.           goto NewsLoop
  551.  
  552. DeleteGame
  553.           open #1,dr$+"war.master"
  554.           position #1,35,(gn-1),30:print #1,0
  555.           position #1,35,(gn-1),0:print #1,"D"
  556.           close
  557.           for pn=1 to 6:gosub RemovePlayer:next
  558.           return
  559.  
  560. Surrender
  561.           if gp=0 print \"You aren't playing in a game."\:goto MainCommand 
  562.           open #1,dr$+"war.master"
  563.           position #1,35,(gn-1),30:input #1,ka
  564.           close
  565.           if ka=0 print \"The game hasn't even started yet! "\:goto MainCommand
  566.           input @2 \"Are you sure you want to surrender? (Y/[N]): ";ka$
  567.           if ka$<>"Y" goto MainCommand
  568.           ka$="S":gosub PlayGame
  569.                          ; Find player number
  570.           open #1,dr$+"war.news":append #1:print #1,date$;": ";
  571.           print #1,a3$   ;" has admitted defeat and surrendered!":close
  572.           gosub RemovePlayer:goto Restart
  573.  
  574. RemovePlayer
  575.           open #1,dr$+"war.master"
  576.           position #1,35,gn-1,(pn-1)*5:print #1,0
  577.           close
  578.           return
  579.  
  580. Winner
  581.           copy dr$+"win.msg"
  582.           gosub DeleteGame
  583.  
  584.           open #1,dr$+"war.news":append #1
  585.           print #1,date$ ;": ";a3$;" is a winner!":close
  586.  
  587.           kb=0:open #1,dr$+"attacks."+gn$
  588.           for p2=0 to 5
  589.           position #1,60,pn,(10*p2)+5:input #1,ka:kb=kb+ka
  590.           next:close
  591.  
  592.           open #1,dr$+"top.score":input #1,ka$:input #1,ka:close
  593.           if kb>ka kill dr$+"top.score":create dr$+"top.score":open #1,dr$+"top.score":print #1,a3$:print #1,kb
  594.           close
  595.           if kb>ka print \"You hold the new top score!"\
  596.  
  597.           open #1,dr$+"war.fame":append #1
  598.           print #1,"|  " ;date$;"       ";left$(a3$+chr$(32,40),40);
  599.           print #1,left$(str$(kb)+chr$(32,25),20);"|"
  600.           close
  601.           return
  602.  
  603. Loser
  604.           print '
  605. You       do not have any armies or cites left.  You have been defeated!  You may now
  606. join      another game if you wish.
  607.  
  608. Please    wait...'
  609.  
  610.           gosub RemovePlayer
  611.  
  612.           open #1,dr$+"war.news":append #1
  613.           print #1,date$ ;": ";a3$;" has been defeated!":close
  614.  
  615.           goto Restart
  616.  
  617. HallFame
  618.           print '
  619.           _____________________________________________________________________________
  620. |                                                                                     |
  621. |                                        Hall of Fame                                 |
  622. |_____________________________________________________________________________|
  623. |                                                                                     |
  624. |          Date           Name                                    Total # of kills    |
  625. |          -------------- --------------------------------------- ------------------  |'
  626.           copy dr$+"war.fame"
  627.           print "|_____________________________________________________________________________| 
  628.           close:open #1,dr$+"top.score"
  629.           input #1,ka$:input #1,ka
  630.           close
  631.           print \"           Most Brutal Conqueror => ";:gosub invon:print ka$;:gosub invoff:print " with "ka" Total Kills."
  632.           goto MainCommand
  633.  
  634. switch
  635.           print \"Choose your emulation:"
  636.           print \"1) Proterm Special"
  637.           print  "2) Datamedia 1500"
  638.           print  "3) ANSI/VT100"
  639.           print \"==> "  ;:input ka$
  640.           if not(instr(ka$,"123")) goto maincommand
  641.           if ka$="3" print \"Emulation => ANSI/VT100":an=1:pt=0:goto maincommand
  642.           if ka$="2" print \"Emulation => Datamedia 1500":an=0:pt=0
  643.           if ka$="1" print \"Emulation => Proterm Special":an=0:pt=1
  644.           print \"Turn your emulation on now and your status bar off, and press <CR>. ";
  645.           input @3 ka$
  646.           goto maincommand
  647.           
  648. mapview
  649.           if gp=0 print \"You must join a game first!":goto MainCommand
  650.           if (pt) or (an) link "a:new.army2","viewmap":else link "a:new.army","viewmap"
  651.  
  652. Screen
  653.           print #3 chr$(30);chr$(31+x);chr$(31+y);
  654.           if (pt) or ((pt=0) and (an=0)) print #4 chr$(30);chr$(31+x);chr$(31+y);
  655.           if AN print #4 chr$(27); "["y";"x"f";
  656.           return
  657.  
  658. InvOn
  659.           print #3 chr$(15);
  660.           if (pt) or ((pt=0) and (an=0)) print #4 chr$(15);
  661.           if an print #4 chr$(27);"[1m";
  662.           return
  663.  
  664. InvOff
  665.           print #3 chr$(14);
  666.           if (pt) or ((pt=0) and (an=0)) print #4 chr$(14);
  667.           if an print #4 chr$(27);"[0m";
  668.           return
  669.  
  670. Home
  671.           print #3 chr$(12);
  672.           if (pt) or ((pt=0) and (an=0)) print #4 chr$(12);
  673.           if an print #4 chr$(27);"[H";chr$(27);"[J";
  674.           return
  675.  
  676. topscrn
  677.           lp$=right$("   "+str$(un),4):clear #9
  678.           print #9,cn$,a1$" "a2$" of "a4$", "a5$,nibble(6)
  679.           print #9,tc,ul,dl,bp,ph$,lc$,lp$,pa$
  680.           for ka=1 to 34:print #9,flag(ka);:next
  681.           print ^
  682.           poke 34,4
  683.           print sc$
  684.           return
  685.  
  686. credits
  687.           print \"                                     by:"
  688.           x = random(100)
  689.           if x>50 print \"                          Mach Three and Bob Noxious"
  690.           if x<51 print \"                          Bob Noxious and Mach Three"
  691.           return
  692.